An efficient process for synthesis of omeprazole is described in WO 97/22603, which is hereby incorporated by reference. In the described process, there is no need for additional purification or isolation steps in between the different reaction steps and a more efficient process is hence offered. Further adding to the simplicity, the reaction sequence is carried is out in one common solvent system throughout the whole process. However, there is still a need of a new, even more convenient and more efficient process for the manufacturing of pyrmetazole in higher yield and with higher purity, and which process provides increased yield of the final products, omeprazole or esomeprazole.